<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      7.12.&nbsp;The rc.site File
    </title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="lfs" id="lfs-7.3">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 7.3
      </h4>
      <h3>
        Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="sysklogd.html" title=
          "Configuring the sysklogd Script">Prev</a>
          <p>
            Configuring the sysklogd Script
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="profile.html" title=
          "The Bash Shell Startup Files">Next</a>
          <p>
            The Bash Shell Startup Files
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-scripts-site" name="ch-scripts-site"></a>7.12. The rc.site
        File
      </h1>
      <p>
        The optional <code class="filename">/etc/sysconfig/rc.site</code>
        file contains settings that are automatically set for each boot
        script. It can alternatively set the values specified in the
        <code class="filename">hostname</code>, <code class=
        "filename">console</code>, and <code class="filename">clock</code>
        files in the <code class="filename">/etc/sysconfig/</code> directory.
        If the associated variables are present in both these separate files
        and <code class="filename">rc.site</code>, the values in the script
        specific files have precedence.
      </p>
      <p>
        <code class="filename">rc.site</code> also contains parameters that
        can customize other aspects of the boot process. Setting the IPROMPT
        variable will enable selective running of bootscripts. Other options
        are described in the file comments. The default version of the file
        is as follows:
      </p>
      <pre class="auto">
# rc.site
# Optional parameters for boot scripts.

# Distro Information
# These values, if specified here, override the defaults
#DISTRO="Linux From Scratch" # The distro name
#DISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report address
#DISTRO_MINI="LFS" # Short name used in filenames for distro config

# Define custom colors used in messages printed to the screen

# Please consult `man console_codes` for more information
# under the "ECMA-48 Set Graphics Rendition" section
#
# Warning: when switching from a 8bit to a 9bit font,
# the linux console will reinterpret the bold (1;) to
# the top 256 glyphs of the 9bit font.  This does
# not affect framebuffer consoles

# These values, if specified here, override the defaults
#BRACKET="\\033[1;34m" # Blue
#FAILURE="\\033[1;31m" # Red
#INFO="\\033[1;36m"    # Cyan
#NORMAL="\\033[0;39m"  # Grey
#SUCCESS="\\033[1;32m" # Green
#WARNING="\\033[1;33m" # Yellow

# Use a colored prefix
# These values, if specified here, override the defaults
#BMPREFIX="     "
#SUCCESS_PREFIX="${SUCCESS}  *  ${NORMAL}"
#FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
#WARNING_PREFIX="${WARNING} *** ${NORMAL}"

# Interactive startup
#IPROMPT="yes" # Whether to display the interactive boot prompt
#itime="3"    # The amount of time (in seconds) to display the prompt

# The total length of the distro welcome string, without escape codes
#wlen=$(echo "Welcome to ${DISTRO}" | wc -c )
#welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"

# The total length of the interactive string, without escape codes
#ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
#i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"

# Set scripts to skip the file system check on reboot
#FASTBOOT=yes

# Skip reading from the console
#HEADLESS=yes

# Speed up boot without waiting for settle in udev_retry
#OMIT_UDEV_RETRY_SETTLE=yes

# Write out fsck progress if yes
#VERBOSE_FSCK=no

# Speed up boot without waiting for settle in udev
#OMIT_UDEV_SETTLE=y

# Speed up boot without waiting for settle in udev_retry
#OMIT_UDEV_RETRY_SETTLE=yes

# Skip cleaning /tmp if yes
#SKIPTMPCLEAN=no

# For setclock
#UTC=1
#CLOCKPARAMS=

# For consolelog
#LOGLEVEL=5

# For network
#HOSTNAME=mylfs

# Delay between TERM and KILL signals at shutdown
#KILLDELAY=3

# Optional sysklogd parameters
#SYSKLOGD_PARMS="-m 0"

# Console parameters
#UNICODE=1
#KEYMAP="de-latin1"
#KEYMAP_CORRECTIONS="euro2"
#FONT="lat0-16 -m 8859-15"
#LEGACY_CHARSET=

</pre>
      <div class="sect2" lang="en" xml:lang="en">
        <h2 class="sect2">
          7.12.1. Customizing the Boot and Shutdown Scripts
        </h2>
        <p>
          The LFS boot scripts boot and shut down a system in a fairly
          efficient manner, but there are a few tweaks that you can make in
          the rc.site file to improve speed even more and to adjust messages
          according to your preferences. To do this, adjust the settings in
          the <code class="filename">/etc/sysconfig/rc.site</code> file
          above.
        </p>
        <div class="itemizedlist">
          <ul>
            <li>
              <p>
                During the boot script <code class="filename">udev</code>,
                there is a call to <span class="command"><strong>udev
                settle</strong></span> that requires some time to complete.
                This time may or may not be required depending on devices
                present in the system. If you only have simple partitions and
                a single ethernet card, the boot process will probably not
                need to wait for this command. To skip it, set the variable
                OMIT_UDEV_SETTLE=y.
              </p>
            </li>
            <li>
              <p>
                The boot script <code class="filename">udev_retry</code> also
                runs <span class="command"><strong>udev
                settle</strong></span> by default. This command is only
                needed by default if the <code class="filename">/var</code>
                directory is separately mounted. This is because the clock
                needs the file <code class=
                "filename">/var/lib/hwclock/adjtime</code>. Other
                customizations may also need to wait for udev to complete,
                but in many installations it is not needed. Skip the command
                by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
              </p>
            </li>
            <li>
              <p>
                By default, the file system checks are silent. This can
                appear to be a delay during the bootup process. To turn on
                the <span class="command"><strong>fsck</strong></span>
                output, set the variable VERBOSE_FSCK=y.
              </p>
            </li>
            <li>
              <p>
                When rebooting, you may want to skip the filesystem check,
                <span class="command"><strong>fsck</strong></span>,
                completely. To do this, either create the file <code class=
                "filename">/fastboot</code> or reboot the system with the
                command <span class="command"><strong>/sbin/shutdown -f -r
                now</strong></span>. On the other hand, you can force all
                file systems to be checked by creating <code class=
                "filename">/forcefsck</code> or running <span class=
                "command"><strong>shutdown</strong></span> with the
                <em class="parameter"><code>-F</code></em> parameter instead
                of <em class="parameter"><code>-f</code></em>.
              </p>
              <p>
                Setting the variable FASTBOOT=y will disable <span class=
                "command"><strong>fsck</strong></span> during the boot
                process until it is removed. This is not recommended on a
                permanent basis.
              </p>
            </li>
            <li>
              <p>
                Normally, all files in the <code class="filename">/tmp</code>
                directory are deleted at boot time. Depending on the number
                of files or directories present, this can cause a noticeable
                delay in the boot process. To skip removing these files set
                the variable SKIPTMPCLEAN=y.
              </p>
            </li>
            <li>
              <p>
                During shutdown, the <span class=
                "command"><strong>init</strong></span> program sends a TERM
                signal to each program it has started (e.g. agetty), waits
                for a set time (default 3 seconds), and sends each process a
                KILL signal and waits again. This process is repeated in the
                <span class="command"><strong>sendsignals</strong></span>
                script for any processes that are not shut down by their own
                scripts. The delay for <span class=
                "command"><strong>init</strong></span> can be set by passing
                a parameter. For example to remove the delay in <span class=
                "command"><strong>init</strong></span>, pass the -t0
                parameter when shutting down or rebooting (e.g. <span class=
                "command"><strong>/sbin/shutdown -t0 -r now</strong></span>).
                The delay for the <span class=
                "command"><strong>sendsignals</strong></span> script can be
                skipped by setting the parameter KILLDELAY=0.
              </p>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="sysklogd.html" title=
          "Configuring the sysklogd Script">Prev</a>
          <p>
            Configuring the sysklogd Script
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="profile.html" title=
          "The Bash Shell Startup Files">Next</a>
          <p>
            The Bash Shell Startup Files
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
